<?php
use yii\helpers\Html;
use yii\widgets\LinkPager;
use yii\helpers\Url;
?>
 <div class="row borB">
    <div class="container lh30">
			<span class="z">
                <?= isset($this->params['crumbs']) ? $this->params['crumbs'] : '' ?>
			</span>
			<span class="y">
				<a href="#"></a>
			</span>
    </div>
    <div class="right_site right_52">
			<span class="z">
				<form name="form" action=""  method="post" >
                    <input type="hidden" name="" value="" id="upload_id" />
                    <input type="submit" style="display:none;" id="upload_sub" />
                </form>

			</span>
    </div>
</div>

    <div class="container mt20">

            <table class="table table-bordered">
                <tr>
                    <th style="text-align:center">日期</th>
                    <th style="text-align:center">用户名</th>
                    <th style="text-align:center">访问IP</th>
                    <th style="text-align:center">访问模块名</th>
                    <th style="text-align:center">访问控制器名</th>
                    <th style="text-align:center">访问方法名</th>
                </tr>
                <?php foreach ($list as $val) {?>
                    <tr>
                        <td class="center"><?= $val['date_created'] ?></td>
                        <td class="center"><?= Html::encode($val['login_name']) ?></td>
                        <td class="center"><?= $val['ip']?></td>
                        <td class="center"><?= $val['module_name'] ?></td>
                        <td class="center"><?= $val['controller_name']?></td>
                        <td class="center"><?= $val['method_name'] ?></td>
                    </tr>
                <?php }?>
            </table>
            <div class="page">
                <?=LinkPager::widget([
                    'pagination' => $page,
                    'firstPageLabel' => '首页',
                    'nextPageLabel' => '下一页',
                    'prevPageLabel' => '上一页',
                    'lastPageLabel' => '末页',
                ]); ?>
            </div>
    </div>

<?php $this->beginBlock('js_index') ?>

/**
 * 修改代理商状态
 * @param id 代理商id
 */
function editStatus(id, status) {
    $.get("<?= Url::to(['editstatus']) ?>", {id:id, status:status},
    function(status) {
        location.reload();
    });
}

<?php $this->endBlock() ?>
<?php $this->registerJs($this->blocks['js_index'], $this::POS_END); ?>
